<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content=
    "application/xhtml+xml; charset=iso-8859-1" />
    <title>
      Expect-5.45.4
    </title>
    <link rel="stylesheet" type="text/css" href="../stylesheets/lfs.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
    <link rel="stylesheet" href="../stylesheets/lfs-print.css" type=
    "text/css" media="print" />
  </head>
  <body class="blfs" id="blfs-2020-04-02">
    <div class="navheader">
      <h4>
        Beyond Linux<sup>�</sup> From Scratch <span class="phrase">(System
        V</span> Edition) - Version 2020-04-02
      </h4>
      <h3>
        Chapter&nbsp;13.&nbsp;Programming
      </h3>
      <ul>
        <li class="prev">
          <a accesskey="p" href="doxygen.html" title=
          "Doxygen-1.8.17">Prev</a>
          <p>
            Doxygen-1.8.17
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="gcc.html" title="GCC-9.3.0">Next</a>
          <p>
            GCC-9.3.0
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="prog.html" title=
          "Chapter&nbsp;13.&nbsp;Programming">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 2020-04-02">
          Home</a>
        </li>
      </ul>
    </div>
    <div class="sect1" lang="en" xml:lang="en">
      <h1 class="sect1">
        <a id="expect" name="expect"></a>Expect-5.45.4
      </h1>
      <div class="package" lang="en" xml:lang="en">
        <h2 class="sect2">
          Introduction to Expect
        </h2>
        <p>
          The <span class="application">Expect</span> package was installed
          in the LFS temporary tools directory for testing other packages.
          These procedures install it in a permanent location. It contains
          tools for automating interactive applications such as <span class=
          "command"><strong>telnet</strong></span>, <span class=
          "command"><strong>ftp</strong></span>, <span class=
          "command"><strong>passwd</strong></span>, <span class=
          "command"><strong>fsck</strong></span>, <span class=
          "command"><strong>rlogin</strong></span>, <span class=
          "command"><strong>tip</strong></span>, etc. <span class=
          "application">Expect</span> is also useful for testing these same
          applications as well as easing all sorts of tasks that are
          prohibitively difficult with anything else.
        </p>
        <p>
          This package is known to build and work properly using an LFS-9.1
          platform.
        </p>
        <h3>
          Package Information
        </h3>
        <div class="itemizedlist">
          <ul class="compact">
            <li class="listitem">
              <p>
                Download (HTTP): <a class="ulink" href=
                "https://downloads.sourceforge.net/expect/expect5.45.4.tar.gz">
                https://downloads.sourceforge.net/expect/expect5.45.4.tar.gz</a>
              </p>
            </li>
            <li class="listitem">
              <p>
                Download MD5 sum: 00fce8de158422f5ccd2666512329bd2
              </p>
            </li>
            <li class="listitem">
              <p>
                Download size: 624 KB
              </p>
            </li>
            <li class="listitem">
              <p>
                Estimated disk space required: 3.2 MB (with tests)
              </p>
            </li>
            <li class="listitem">
              <p>
                Estimated build time: 0.2 SBU (with tests)
              </p>
            </li>
          </ul>
        </div>
        <h3>
          Expect Dependencies
        </h3>
        <h4>
          Required
        </h4>
        <p class="required">
          <a class="xref" href="tcl.html" title="Tcl-8.6.10">Tcl-8.6.10</a>
        </p>
        <h4>
          Optional
        </h4>
        <p class="optional">
          <a class="xref" href="tk.html" title="Tk-8.6.10">Tk-8.6.10</a>
        </p>
        <p class="usernotes">
          User Notes: <a class="ulink" href=
          "http://wiki.linuxfromscratch.org/blfs/wiki/expect">http://wiki.linuxfromscratch.org/blfs/wiki/expect</a>
        </p>
      </div>
      <div class="installation" lang="en" xml:lang="en">
        <h2 class="sect2">
          Installation of Expect
        </h2>
        <p>
          Install <span class="application">Expect</span> by running the
          following commands:
        </p>
        <pre class="userinput">
<kbd class="command">./configure --prefix=/usr           \
            --with-tcl=/usr/lib     \
            --enable-shared         \
            --mandir=/usr/share/man \
            --with-tclinclude=/usr/include &amp;&amp;
make</kbd>
</pre>
        <p>
          To test the results, issue: <span class="command"><strong>make
          test</strong></span>.
        </p>
        <p>
          Now, as the <code class="systemitem">root</code> user:
        </p>
        <pre class="root">
<kbd class="command">make install &amp;&amp;
ln -svf expect5.45.4/libexpect5.45.4.so /usr/lib</kbd>
</pre>
      </div>
      <div class="commands" lang="en" xml:lang="en">
        <h2 class="sect2">
          Command Explanations
        </h2>
        <p>
          <em class="parameter"><code>-with-tcl=/usr/lib</code></em>: This
          parameter is used to tell the <span class=
          "command"><strong>configure</strong></span> script where the
          <span class="command"><strong>tclConfig.sh</strong></span> is
          located.
        </p>
        <p>
          <em class="parameter"><code>--enable-shared</code></em>: This
          option enables building the shared library.
        </p>
        <p>
          <span class="command"><strong>ln -sf ...</strong></span>: This
          command creates a required link to the shared library.
        </p>
      </div>
      <div class="configuration" lang="en" xml:lang="en">
        <h2 class="sect2">
          Configuring Expect
        </h2>
        <div class="sect3" lang="en" xml:lang="en">
          <h3 class="sect3">
            <a id="expect-config" name="expect-config"></a>
          </h3>
          <h4 class="title">
            <a id="expect-config" name="expect-config"></a>Config Files
          </h4>
          <p>
            <code class="filename">$exp_library/expect.rc</code> and
            <code class="filename">~/.expect.rc</code>
          </p>
        </div>
        <div class="sect3" lang="en" xml:lang="en">
          <h3 class="sect3"></h3>
          <h4 class="title">
            <a id="idm140006449690448" name=
            "idm140006449690448"></a>Configuration Information
          </h4>
          <p>
            Reference the <span class=
            "command"><strong>expect</strong></span> man page for information
            about utilizing the <code class="filename">expect.rc</code>
            configuration files. Additionally, many of the tools contained in
            the <span class="application">Expect</span> package will use
            their own configuration files. Reference the respective man page,
            or examine the script directly for configuration file
            information.
          </p>
        </div>
      </div>
      <div class="content" lang="en" xml:lang="en">
        <h2 class="sect2">
          Contents
        </h2>
        <div class="segmentedlist">
          <div class="seglistitem">
            <div class="seg">
              <strong class="segtitle">Installed Programs:</strong>
              <span class="segbody">autoexpect, autopasswd, cryptdir,
              decryptdir, dislocate, expect, ftp-rfc, kibitz, lpunlock,
              mkpasswd, passmass, rftp, rlogin-cwd, timed-read, timed-run,
              unbuffer, weather, and optionally (if <span class=
              "application">Expect</span> was linked against <span class=
              "application">Tk</span>), multixterm, tknewsbiff, tkpasswd,
              xkibitz, and xpstat</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed Library:</strong>
              <span class="segbody">libexpect5.45.4.so</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed Directory:</strong>
              <span class="segbody">/usr/lib/expect5.45.4</span>
            </div>
          </div>
        </div>
        <div class="variablelist">
          <h3>
            Short Descriptions
          </h3>
          <table border="0" class="variablelist">
            <colgroup>
              <col align="left" valign="top" />
              <col />
            </colgroup>
            <tbody>
              <tr>
                <td>
                  <p>
                    <a id="autoexpect" name="autoexpect"></a><span class=
                    "term"><span class=
                    "command"><strong>autoexpect</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    generates an <span class="application">Expect</span>
                    script from watching a session.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="autopasswd" name="autopasswd"></a><span class=
                    "term"><span class=
                    "command"><strong>autopasswd</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is a wrapper to make <span class=
                    "command"><strong>passwd</strong></span>(1) be
                    non-interactive.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="cryptdir" name="cryptdir"></a><span class=
                    "term"><span class=
                    "command"><strong>cryptdir</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    encrypts all files in a directory.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="decryptdir" name="decryptdir"></a><span class=
                    "term"><span class=
                    "command"><strong>decryptdir</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    decrypts all files in a directory.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="dislocate" name="dislocate"></a><span class=
                    "term"><span class=
                    "command"><strong>dislocate</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    allows processes to be disconnected and reconnected to a
                    terminal.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="expect-prog" name="expect-prog"></a><span class=
                    "term"><span class=
                    "command"><strong>expect</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is a program that <span class="quote">&ldquo;<span class=
                    "quote">talks</span>&rdquo;</span> to other interactive
                    programs according to a script.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="ftp-rfc" name="ftp-rfc"></a><span class=
                    "term"><span class=
                    "command"><strong>ftp-rfc</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    retrieves an RFC (or the index) from UUNET.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="kibitz" name="kibitz"></a><span class=
                    "term"><span class=
                    "command"><strong>kibitz</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    allows two (or more) people to interact with one shell
                    (or any arbitrary program).
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="lpunlock" name="lpunlock"></a><span class=
                    "term"><span class=
                    "command"><strong>lpunlock</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    unhangs a printer which claims it is <span class=
                    "quote">&ldquo;<span class="quote">waiting for
                    lock</span>&rdquo;</span>.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="mkpasswd" name="mkpasswd"></a><span class=
                    "term"><span class=
                    "command"><strong>mkpasswd</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    generates passwords and can apply them automatically to
                    users.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="passmass" name="passmass"></a><span class=
                    "term"><span class=
                    "command"><strong>passmass</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    changes a password on multiple machines.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="rftp" name="rftp"></a><span class=
                    "term"><span class=
                    "command"><strong>rftp</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is much like <span class=
                    "command"><strong>ftp</strong></span> except it uses
                    <code class="option">~g</code> and <code class=
                    "option">~p</code> instead of <code class=
                    "option">mget</code> and <code class=
                    "option">mput</code>.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="rlogin-cwd" name="rlogin-cwd"></a><span class=
                    "term"><span class=
                    "command"><strong>rlogin-cwd</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is <span class="command"><strong>rlogin</strong></span>
                    except it uses the local current directory as the current
                    working directory on the remote machine.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="timed-read" name="timed-read"></a><span class=
                    "term"><span class=
                    "command"><strong>timed-read</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    reads a complete line from stdin and aborts after a given
                    number of seconds.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="timed-run" name="timed-run"></a><span class=
                    "term"><span class=
                    "command"><strong>timed-run</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    runs a program for a given amount of time.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="unbuffer" name="unbuffer"></a><span class=
                    "term"><span class=
                    "command"><strong>unbuffer</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    disables the output buffering that occurs when program
                    output is redirected.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="weather" name="weather"></a><span class=
                    "term"><span class=
                    "command"><strong>weather</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    retrieves a weather report (courtesy University of
                    Michigan) for a given city or geographical area.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="multixterm" name="multixterm"></a><span class=
                    "term"><span class=
                    "command"><strong>multixterm</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    creates multiple <span class=
                    "command"><strong>xterm</strong></span>s that can be
                    driven together or separately.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="tknewsbiff" name="tknewsbiff"></a><span class=
                    "term"><span class=
                    "command"><strong>tknewsbiff</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    pops up a window when there is unread news in your
                    favorite newsgroups and removes the window after you've
                    read the news.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="tkpasswd" name="tkpasswd"></a><span class=
                    "term"><span class=
                    "command"><strong>tkpasswd</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is a script to change passwords using <span class=
                    "command"><strong>expect</strong></span> and <span class=
                    "application">Tk</span>.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="xkibitz" name="xkibitz"></a><span class=
                    "term"><span class=
                    "command"><strong>xkibitz</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    allows users in separate <span class=
                    "command"><strong>xterm</strong></span>s to share one
                    shell (or any program that runs in an <span class=
                    "command"><strong>xterm</strong></span>).
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="xpstat" name="xpstat"></a><span class=
                    "term"><span class=
                    "command"><strong>xpstat</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is a script that acts as a front-end for <span class=
                    "command"><strong>xpilot</strong></span>.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="libexpect" name="libexpect"></a><span class=
                    "term"><code class=
                    "filename">libexpect5.45.4.so</code></span>
                  </p>
                </td>
                <td>
                  <p>
                    contains functions that allow <span class=
                    "application">Expect</span> to be used as a <span class=
                    "application">Tcl</span> extension or to be used directly
                    from C or C++ (without <span class=
                    "application">Tcl</span>).
                  </p>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
      <p class="updated">
        Last updated on 2020-03-24 14:19:44 -0500
      </p>
    </div>
    <div class="navfooter">
      <ul>
        <li class="prev">
          <a accesskey="p" href="doxygen.html" title=
          "Doxygen-1.8.17">Prev</a>
          <p>
            Doxygen-1.8.17
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="gcc.html" title="GCC-9.3.0">Next</a>
          <p>
            GCC-9.3.0
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="prog.html" title=
          "Chapter&nbsp;13.&nbsp;Programming">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 2020-04-02">
          Home</a>
        </li>
      </ul>
    </div>
  </body>
</html>
